Learn about java get class name in static method, we have the largest and most updated java get class name in static method information on alibabacloud.com
Java Basics-Stack and heap, static, final modifier, inner class, and Java memory allocation (RPM)Java Stack and heapHeap: Random in orderStack: LIFO (last-in/first-out).The Java heap is a run-time data area in which the objects of the class allocate
The ClassLoader (class loader) is a very important concept in java™. The ClassLoader is responsible for loading the Java class's byte code into the Java virtual machine. In this paper, the basic concepts of Java ClassLoader are introduced in detail,
A passage in Java programming thought:When writing a Java source code file, this file is often referred to as a compilation unit (sometimes referred to as a translation unit). Each compilation unit must have a suffix name. java, and within the
Static methods are not associated with a specific instance and cannot reference this. To obtain the current class name, there is no direct method.The following methods can be used for data query and testing:1 public static void testGetClassName ()2 {
Java internal class (InnerClass) ---- non-static internal class, static internal class, local internal class, anonymous internal classMany people are not familiar with the java underwear Class. In fact, similar concepts also exist in c ++, that is,
1.static concept Static modifier, what is static modifier? As you know, any variable or code in the program is automatically allocated by the system at compile time to store the memory, and so-called static refers to the memory allocated after
Package com.hanwei.service;
Class testparent{public
testparent () {
System.out.println ("I am a parameterless constructor for the parent class");
}
Public Testparent (String a) {
System.out.println
The inner classes can be static (static) and can use public, protected, and private access controls, while external classes can use only public, or default.A class that is directly defined within a member's inner class (not inside a method or inside
Java Tour (Fri)--this,static, keyword, main function, encapsulating tool class, generating Javadoc manual, static code block
Have a lot of weekend, continue to study
One. this keyword
Used to distinguish between local
Today read the Java Programming Idea (4th Edition Chinese version), just review the class of the initialization of the member of this knowledge point. In order to deepen the impression and give other people a little reference, examples in the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.